package org.dromara.system.openApi.domain.bo;

import org.dromara.system.openApi.domain.OpenApiClient;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * openApiClient业务对象 open_api_client
 *
 * @author wdm
 * @date 2024-03-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OpenApiClient.class, reverseConvertGenerate = false)
public class OpenApiClientBo extends BaseEntity {

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 客户端id
     */
    @NotBlank(message = "客户端id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String clientId;

    /**
     * 客户端密钥
     */
    @NotBlank(message = "客户端密钥不能为空", groups = { AddGroup.class, EditGroup.class })
    private String clientSecret;

    /**
     * 客户端名称
     */
    @NotBlank(message = "客户端名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String clientName;

    /**
     * 是否是内部应用(1:是 0：否)
     */
    @NotNull(message = "是否是内部应用(1:是 0：否)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean isInner;

    /**
     * 状态(1:正常 0：已停用)
     */
    @NotNull(message = "状态(1:正常 0：已停用)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 是否加密数据(1:是 0:否)
     */
    @NotNull(message = "是否加密数据(1:是 0:否)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean requireEncrypt;

    /**
     * 是否验签(1:是 0:否)
     */
    @NotNull(message = "是否验签(1:是 0:否)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean checkSign;

    /**
     * 允许的最大时间差，单位分钟(0表示不验证）
     */
    @NotNull(message = "允许的最大时间差，单位分钟(0表示不验证）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer diffCurTime;

    /**
     * 备注
     */
    private String remark;


}
